package com.jacky.dubbo3;

import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class Task implements CommandLineRunner {

    @DubboReference(protocol = "dubbo")
    private IGreetingService greetingService;

    @DubboReference(protocol = "tri")
    private ITripleGreetingService tripleGreetingService;

    @Override
    public void run(String... args) throws Exception {
        System.out.println(greetingService.greeting("Jacky"));

        System.out.println(tripleGreetingService.greeting("Jan"));
    }
}
